﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OnLineSO.aspx.cs" Inherits="WMS6.Web.OrderManagement.OnLineSO" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>OnLineSO</title>
    <link href="../style/zh/1/css.css" type="text/css" rel="Stylesheet" id="mycss" />
    <link href="../Css/style.css" type="text/css" rel="stylesheet" />
    <script src="../Js/jquery.js" type="text/javascript"></script>
    <script src="../Js/jquery.simplemodal.js" type="text/javascript"></script>
    <script src="../Js/jquery.blockUI.js" type="text/javascript"></script>

    <script src="../Js/util.js" type="text/javascript"></script>
    <script src="../Js/InitPage.js" type="text/javascript"></script>
    <script src="../Js/checkbox.js" type="text/javascript"></script>
    <script src="../Js/Verification.js" type="text/javascript"></script>
    <script src="../Js/calendar.js" type="text/javascript" charset="gb2312"></script>
    
    <script type="text/javascript">
        //初始化页面
        window.onload = function(){
            initEditNewPage();
        }
        
        function newOrder()
        {
            var from = document.getElementById("hdnFrom").value;
            window.location.href = "OnLineSO.aspx?from="+ escape(from);
            return false;
        }
        
        //弹出客户代码
        function selectCustomerID()
        {
            var rtnValue = popModalWindow('../Configuration/CustomerQuery.aspx?action=txtCustomerID','dialogWidth=800px;dialogHeight=500px;center=yes;resizable=yes;status=no;');
            if(rtnValue != null && rtnValue.toString() != "")
            {
                document.getElementById("txtCustomerID").focus();
                document.getElementById("txtCustomerID").value = rtnValue;
                __doPostBack("txtCustomerID_TextChanged", "");   
            }
        }
        
        //弹出窗口选择货品
        function selectSku(obj,rowIndex)
        {
            document.getElementById("hdnRowIndex").value = rowIndex;
            var rtnValue = FastPopModalWindow('../Configuration/SkuQuery.aspx?ownerID=' + escape(document.getElementById("hdnOwnerID").value),'dialogWidth=800px;dialogHeight=500px;center=yes;resizable=yes;status=no;');
            if(rtnValue != null && rtnValue.toString() != "")
            {
                document.getElementById(obj.id.toString()).focus();
                document.getElementById(obj.id.toString()).value = " ";
                document.getElementById("hdnSkuID").value = rtnValue;
                __doPostBack("txtSkuID_TextChanged","");
            }
        }
        
        //当货品代码文本框失去焦点的时候 给隐藏的RowIndex赋值
        function setSkuIDRowIndex(rowIndex)
        {
            document.getElementById("hdnRowIndex").value = rowIndex;
        }
        
        //验证用户输入的PageIndex
        //只允许输入数字，并且第一个字符不能为0
        function checkInputPageIndex(obj)
        {
            if(obj!=null)
            {
                var inputIndex = obj.value;
                inputIndex = inputIndex.replace(/[^\d]/g,'');
                if(inputIndex.length == 1 && inputIndex == "0")
                {
                    obj.value = "";
                }
                else
                {
                    obj.value = inputIndex;
                }
            }
            //value=value.replace(/[^\d]/g,'')
        }
        
        function confirmMsg(code) 
	     {
	         if (code == "F7100_001") 
	         {
	             if (confirm('<%=GetGlobalMsgResource("F7100_001") %>')) 
	             {
		                return true;
		            }
		            else {
		                return false;
		            }
		        }
		     else if (code == "F7100_010") 
	         {
	             if (confirm('<%=GetGlobalMsgResource("F7100_010") %>'))
	              {
		                return true;
		            }
		            else {
		                return false;
		            }
		        }
		    else if (code == "F7100_034") 
	         {
	             if (confirm('<%=GetGlobalMsgResource("F7100_034") %>'))
	              {
		                return true;
		          }
                else 
                  {
		                return false;
		          }
		        }
		    else if (code == "F7100_035") 
	         {
	             if (confirm('<%=GetGlobalMsgResource("F7100_035") %>'))
	              {
		                return true;
		            }
		            else {
		                return false;
		            }
		        }
		    else if (code == "F7100_036") 
	         {
	             if (confirm('<%=GetGlobalMsgResource("F7100_036") %>'))
	              {
		                return true;
		            }
		            else {
		                return false;
		            }
		        }
		        else if (code == "C010") {
		        if (confirm('<%=GetGlobalMsgResource("C010") %>')) {
		                return true;
		            }
		            else {
		                return false;
		            }
		        }
		    }
        
        function insertNewRow()
        {   
            if(event.keyCode == 45)
            {
                document.getElementById("btnAddDetail").click();
            }
        }
        
        function showAction()
		{	
			var pos = getElementPos("btnAction");	
			document.getElementById("actionDiv").style.top = pos.y+17;
			document.getElementById("actionDiv").style.left = pos.x;  			
			document.getElementById("hiddenFlag").value = '1';
		}
		
		function hiddenDiv() {
		    var flag = document.getElementById("hiddenFlag").value
		    if (flag == "1") {
		        document.getElementById("actionDiv").style.display = "block";
		        document.getElementById("hiddenFlag").value = '0';
		    }
		    else {
		        document.getElementById("actionDiv").style.display = "none";
		    }
		}
		
		//显示 报表 DIV
		function showReport() {
		    var pos = getElementPos("htmlbtnReport");
		    document.getElementById("reportDiv").style.top = pos.y + 17;
		    document.getElementById("reportDiv").style.left = pos.x;
		    document.getElementById("hiddenReportFlag").value = '1';
		}
		//隐藏 报表 DIV
		function hiddenReportDiv() {
		    var flag = document.getElementById("hiddenReportFlag").value
		    if (flag == "1") {
		        document.getElementById("reportDiv").style.display = "block";
		        document.getElementById("hiddenReportFlag").value = '0';
		    }
		    else {
		        document.getElementById("reportDiv").style.display = "none";
		    }
		}
		//弹出 打印 采购订单 的窗口
		function popPrintSalesOrder() {
		    var orderID = document.getElementById("txtOrderID").value;
		    var OwnerID= document.getElementById("txtOwnerID").value;
		    window.open('../Common/PrintReport.aspx?rtype=printSalesOrder&orderID=' + escape(orderID)+'&OwnerID='+escape(OwnerID), 'PrintWindow', 'width=860,height=610,top=50,left=50,toolbar=no,menubar=no,scrollbars=yes, resizable=yes,location=no,status=no');
		}
		//导入
        function ImportSalesOrderDetail() 
        {
            var ownerID = document.getElementById("hdnOwnerID").value;
            var customerID = document.getElementById("txtCustomerID").value;
            
            if (ownerID != "")
            {
                if (customerID != "")
                {
                    var rtnValue = popModalWindow('../Common/ImporData.aspx?action=SalesOrderDetail&ownerID=' + escape(ownerID) + "&customerID=" + escape(customerID), 'dialogWidth=520px;dialogHeight=350px;center=yes;resizable=yes;status=no;')
                  
                    if (rtnValue != "") {
                       // window.location.href = "OnLineSO.aspx?from=import&ID=" + escape(rtnValue);
                      __doPostBack('<%=aImportSalesOrder.ClientID.Replace('_','$')%>','');     
                    }
                }
                else
                {
                    alert("默认客户未设置!");
                }
            }
            else
            {
                alert("默认货主未设置!");
            }
        }

		function SetCountQty(obj) {

		    var qty1 = obj.value.replace(/(^\s*)|(\s*$)/g, "");
		    var qty2 = obj.key.replace(/(^\s*)|(\s*$)/g, "");
		    if (qty1 == '') {
		        qty1 = 0;
		    }
		    if (qty2 == ''||qty2=="NaN") {
		        qty2 = 0;
		    }
		    var qty = parseInt(qty1) - parseInt(qty2);
		       document.getElementById('txtTotalQty').value =parseInt(  document.getElementById('txtTotalQty').value)+ qty;
		       obj.key = obj.value;
		}
		function SaveButton()
  {
          __doPostBack('<%=btnSave.ClientID.Replace('_','$')%>',''); 
    document.getElementById('btnSave').disabled='disabled';
  }
      //锁屏
		function blockScreen()
		{
		    //锁屏
		    $.blockUI.defaults.message = GetBlockUIMsg();
            $.blockUI.defaults.overlayCSS.backgroundColor = GetBlockUIBgColor();
            $.blockUI();
		}
    </script>
</head>
<body onkeydown="insertNewRow()">
    <form id="F3032" runat="server">
     <asp:ScriptManager ID="ScriptManager1" runat="server" />
    <div>
      <asp:UpdatePanel ID="up1" runat="server">
            <ContentTemplate>
        <div id="div_top">
            <table>
                <tr>
                    <td valign="bottom">
                        <asp:Label ID="lblSalesOrder" runat="server" CssClass="label_header" Text="网上下单" ></asp:Label>
                    </td>
                    <td>
                        <asp:Button ID="btnGoBack" runat="server" CssClass="button" Text="<%$ Resources:ButtonResource,btnGoBack %>"
                            CausesValidation="False" OnClick="btnGoBack_Click" Enabled="False"  />
                    </td>
                    <td>
                        <asp:Button ID="btnNew" runat="server" CssClass="button" Text="<%$ Resources:ButtonResource,btnNew %>"
                            Enabled="False" AccessKey="n" OnClientClick="newOrder();return false;"  />
                    </td>
                    <td>
                        <asp:Button ID="btnSave" runat="server" CssClass="button" Text="<%$ Resources:ButtonResource,btnSave %>"
                            Enabled="False" AccessKey="s" OnClientClick="blockScreen();SaveButton();" OnClick="btnSave_Click"  />
                    </td>
                    <td>
                        <asp:Button ID="btnDelete" runat="server" CssClass="button" Text="<%$ Resources:ButtonResource,btnDelete %>"
                            Enabled="False" AccessKey="d"    OnClientClick="javascript:if(confirmMsg('F7100_001')) return true; else return false;"
                            OnClick="btnDelete_Click" />
                    </td>
                    <td>
                        <asp:Button ID="btnCopy" runat="server" CssClass="button" Text="<%$ Resources:ButtonResource,btnCopy %>"
                            AccessKey="c" Visible="false" />
                    </td>
                    <td>
                        <asp:Button ID="btnRefresh" runat="server" CssClass="button" Text="<%$ Resources:ButtonResource,btnRefresh %>"
                            Enabled="False" AccessKey="r" />
                    </td>
                    <td>
                        <input id="btnAction" type="button" runat="server" value="<%$Resources:ButtonResource,btnAction%>"
                            class="button" onclick="showAction(); return false;" />
                    </td>
                    <td>
                        <input id="htmlbtnReport" type="button" runat="server" value="<%$Resources:ButtonResource,btnReport%>"
                            class="button" onclick="showReport();" />
                    </td>
                </tr>
            </table>
        </div>
        <div>
            <asp:Label ID="lblMsg" runat="server" CssClass="label_message"></asp:Label>
        </div>
        <%--<div id="div_menu">
            <div style="float: left; width: 8px;">
                <div class="tabL" id="divL1">
                </div>
            </div>
            <div style="float: left;" class="tabLabelCont tabCur" onclick="setTab('one',1,5)"
                id="divM1">
                <asp:Label ID="one1" CssClass="hover" runat="server" meta:resourcekey="one1">常规</asp:Label></div>
            <div style="float: left; margin-right: 2px;">
                <div class="tabR" id="divR1">
                </div>
            </div>
        </div>--%>
        <div id="div_content" style="margin-top:10px;">
            <div id="con_one_1" style="display: block;">
                <table width="720px" style="display: block; margin-left: 10px; margin-top: 10px;">
                    <tr>
                        <td width="180px">
                            <asp:Label ID="lblOrderID" runat="server" CssClass="label" Text="订单号" meta:resourcekey="lblOrderID"></asp:Label>
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblStatus" runat="server" CssClass="label" Text="状态" meta:resourcekey="lblStatus"></asp:Label>
                        </td>
                        <td width="180px">
                        <asp:Label ID="lblOrderDate" runat="server" CssClass="label" Text="订单日期" meta:resourcekey="lblOrderDate"></asp:Label>
                            </td>
                        <td width="180px">
                             <asp:Label ID="lblSubmittedBy" runat="server" CssClass="label" Text="提交人" meta:resourcekey="lblRequestShipDate"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td width="180px">
                            <asp:TextBox ID="txtOrderID" runat="server" CssClass="textbox" Enabled="false" ></asp:TextBox>
                        </td>
                        <td width="180px">
                            <asp:DropDownList ID="ddlStatus" runat="server" CssClass="mediumselectbox" Enabled="False" >
                            </asp:DropDownList>
                        </td>
                        <td width="180px">
                            <asp:TextBox ID="txtOrderDate" runat="server" CssClass="textbox" Enabled="false"></asp:TextBox>
                            </td>
                        <td width="180px">
                        <asp:TextBox ID="txtSubmittedBy" runat="server" CssClass="textbox" Enabled="false" ></asp:TextBox>
                         
                            </td>
                    </tr>
                    <tr>
                        <td width="180px">
                            <asp:Label ID="lblCustomerID" runat="server" CssClass="label" Text="客户代码" meta:resourcekey="lblCustomerID"></asp:Label>
                        </td>
                        <td width="180px">
                            
                        <asp:Label ID="lblTotalQty" runat="server" CssClass="label" Text="总数量" meta:resourcekey="lblTotalQty"></asp:Label>
                            
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblRequestedDeliveryDate" runat="server" CssClass="label" Text="要求到货日期" meta:resourcekey="lblRequestShipDate"></asp:Label>
                            </td>
                        <td width="180px">
                                     <asp:Label ID="lblSubmittedDate" runat="server" CssClass="label" Text="提交日期" ></asp:Label>
                     
                       
                        </td>
                    </tr>
                    <tr>
                        <td width="180px">
                            <asp:TextBox ID="txtCustomerID" runat="server" CssClass="textbox"  
                                AutoPostBack="True" OnTextChanged="txtCustomerID_TextChanged" Enabled="false"
                                meta:resourcekey="txtCustomerID"  ></asp:TextBox>
                        </td>
                        <td width="180px">
                            <asp:TextBox ID="txtTotalQty" runat="server" CssClass="textbox" Enabled="false" Text="0" ></asp:TextBox>
                        </td>
                        <td width="180px">
                            <asp:TextBox ID="txtRequestedDeliveryDate" runat="server" CssClass="textbox" ></asp:TextBox><img src="../Images/calendar.gif" class="img" alt="请选择日期" onclick="setday(this,txtRequestedDeliveryDate)"/>
                            </td>
                        <td width="180px">
                           <asp:TextBox ID="txtSubmittedDate" runat="server" CssClass="textbox"  Enabled="False" ></asp:TextBox>
                          
                            </td>
                    </tr>
                    <tr>
                        <td width="180px">
                            <asp:Label ID="lblRemark" runat="server" CssClass="label" Text="备注" meta:resourcekey="lblRemark"></asp:Label>
                        </td>
                        <td width="180px">
                            
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblActualShipDate" runat="server" CssClass="label" Visible="false" Text="实际发货日期" meta:resourcekey="lblActualShipDate"></asp:Label>
                        </td>
                        <td width="180px">
                          </td>
                    </tr>
                    <tr>
                        <td width="180px" colspan="2">
                            <asp:TextBox ID="txtRemark" runat="server" CssClass="largetextbox"></asp:TextBox>
                        </td>
                        <td width="180px">
                            <asp:TextBox ID="txtActualShipDate" runat="server" CssClass="textbox"  Enabled="False"  Visible="false" ></asp:TextBox>
                            </td>
                        <td width="180px">
                              </td>
                    </tr>
                    
                    <tr style="height: 10px;">
                        <td colspan="4">
                        </td>
                    </tr>
                </table>
            </div>
            </div>
       <%-- <div style="width:98%; height:21px; margin-left:10px; margin-top:10px; margin-bottom:0px; ">
            <div style="float: left; width: 8px;">
                <div class="tabL" id="divL2">
                </div>
            </div>
            <div style="float: left;" class="tabLabelCont tabCur"  id="divM2">
                <asp:Label ID="one2" CssClass="hover" runat="server" >订单明细</asp:Label></div>
            <div style="float: left; margin-right: 2px;">
                <div class="tabR" id="divR2">
                </div>
            </div>
        </div>--%>
       
        <div id="div_content2" style="margin-top:10px;">
            <div id="con_one_2" style="display:block;">
            <table width="720px" style="display: block; margin-left: 10px; margin-top: 10px;">
                <tr>
                    <td>
                        <table>
                            <tr>
                                <td>
                                    <asp:Button ID="btnAddDetail" runat="server" CssClass="button" Enabled="false" Text="<%$ Resources:ButtonResource,btnAddDetail %>" OnClick="btnAddDetail_Click" />
                                </td>
                                <td>
                                    <asp:Button ID="btnDeleteDetail" runat="server" CssClass="button" Enabled="false" Text="<%$ Resources:ButtonResource,btnDeleteDetail %>" OnClick="btnDeleteDetail_Click" />
                                </td>
                                <td>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td>
                    <div style="margin-top:10px; ">
                        <asp:GridView ID="gvSalesOrderDetail" runat="server" AllowSorting="true" AutoGenerateColumns="False"
                            AllowPaging="False" CssClass="gridview" 
                            DataKeyNames="LineID,PackID" Width="900px" 
                            OnRowDataBound="gvSalesOrderDetail_RowDataBound"
                             OnSorting="gvSalesOrderDetail_Sorting">
                            <FooterStyle CssClass="GridViewFooterStyle" />
                            <RowStyle CssClass="GridViewRowStyle" />
                            <HeaderStyle CssClass="GridViewHeaderStyle" />
                            <PagerStyle CssClass="GridViewPageStyle" />
                            <AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
                            <Columns>
                                <asp:TemplateField meta:resourcekey="TemplateField">
                                    <HeaderTemplate>
                                        <asp:CheckBox ID="CheckBox1" runat="server" onclick="selectAll(this,'gvSalesOrderDetail');"
                                            meta:resourcekey="CheckBox1" />
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <asp:CheckBox ID="chbSelect" runat="server" meta:resourcekey="chbSelect" />
                                    </ItemTemplate>
                                    <FooterTemplate>
                                        <asp:CheckBox ID="CheckBox2" runat="server" onclick="selectAll(this,'gvSalesOrderDetail');"
                                            meta:resourcekey="CheckBox2" />
                                    </FooterTemplate>
                                    <HeaderStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_40" />
                                    <ItemStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_40" />
                                </asp:TemplateField>
                                <asp:BoundField HeaderText="行号" FooterText="行号" >
                                    <ItemStyle CssClass="GridViewRowWidth_50" />
                                </asp:BoundField>
                                <asp:TemplateField FooterText="货品代码" HeaderText="货品代码*" SortExpression="SkuID" >
                                    <ItemTemplate>
                                        <asp:TextBox ID="txtSkuID" runat="server" Text='<%# Eval("SkuID").ToString() %>'  Width="100px" AutoPostBack="True" 
                                        ontextchanged="txtSkuID_TextChanged"></asp:TextBox>&nbsp;<asp:Image ID="imgSkuID" ImageUrl="../Images/icon_find.gif" CssClass="img" 
                                                runat="server" meta:resourcekey="imgSkuID" />
                                    </ItemTemplate>
                                    <ItemStyle CssClass="GridViewRowWidth_150" />
                                </asp:TemplateField>
                                <asp:TemplateField FooterText="货品描述" HeaderText="货品描述" SortExpression="SkuDescr"  meta:resourcekey="SkuDescr">
                                    <ItemTemplate>
                                        <asp:Label ID="lblSkuDescr" runat="server" Text='<%# Eval("SkuDescr").ToString() %>'
                                            meta:resourcekey="lblSkuDescr"></asp:Label>
                                    </ItemTemplate>
                                    <ItemStyle CssClass="GridViewRowWidth_200" />
                                </asp:TemplateField>
                                  <asp:TemplateField FooterText="包装代码" HeaderText="包装代码" SortExpression="PackID"  >
                                    <ItemTemplate>
                                        <asp:Label ID="lblPackID" runat="server" Text='<%# Eval("PackID").ToString() %>'
                                            meta:resourcekey="lblPackID"></asp:Label>
                                    </ItemTemplate>
                                    <ItemStyle CssClass="GridViewRowWidth_50" />
                                </asp:TemplateField>
                                <asp:TemplateField FooterText="数量" HeaderText="数量*" SortExpression="OriginalQty">
                                    <ItemTemplate>
                                        <asp:TextBox ID="txtOriginalQty" runat="server" onkeyup="checkInputPageIndex(this)"  MaxLength="5"  Width="50px" Text='<%# ConvertQty(Eval("OriginalQty").ToString()) %>'></asp:TextBox>
                                    </ItemTemplate>
                                    <ItemStyle CssClass="GridViewRowWidth_50" />
                                </asp:TemplateField>
                                <asp:TemplateField FooterText="单位" HeaderText="单位" SortExpression="UomDescr" >
                                    <ItemTemplate>
                                        <asp:Label ID="lblUomID" runat="server" Text='<%# Eval("UomDescr").ToString() %>' ToolTip='<%# Eval("UomID").ToString() %>'
                                            meta:resourcekey="lblUomID"></asp:Label>
                                    </ItemTemplate>
                                    <ItemStyle CssClass="GridViewRowWidth_50" />
                                </asp:TemplateField>
                                <asp:TemplateField FooterText="备注" HeaderText="备注" SortExpression="Remark">
                                    <ItemTemplate>
                                        <asp:TextBox ID="txtRemark" Width="100px" runat="server" Text='<%# Eval("Remark").ToString() %>'></asp:TextBox>
                                    </ItemTemplate>
                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                </asp:TemplateField>
                                <asp:TemplateField FooterText="状态" HeaderText="状态" SortExpression="StatusD">
                                    <ItemTemplate>
                                        <asp:Label ID="lblStatus" Width="100px" runat="server" Text='<%# Eval("StatusD").ToString() %>'></asp:Label>
                                    </ItemTemplate>
                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                </asp:TemplateField>
                                <asp:TemplateField FooterText="发货数量" HeaderText="发货数量" SortExpression="ShippedQty" >
                                    <ItemTemplate>
                                        <asp:Label ID="lblShippedQty" runat="server" Text='<%# GetPreferenceDigit(Eval("ShippedQty").ToString()) %>'
                                            meta:resourcekey="lblShippedQty"></asp:Label>
                                    </ItemTemplate>
                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                </asp:TemplateField>                              
                                <asp:TemplateField FooterText="单价" HeaderText="单价" SortExpression="UnitPrice" Visible="false">
                                    <ItemTemplate>
                                        <asp:Label ID="lblUnitPrice" runat="server" Text='<%# GetPreferenceDigit(Eval("UnitPrice").ToString()) %>'
                                            meta:resourcekey="lblUnitPrice"></asp:Label>
                                    </ItemTemplate>
                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                </asp:TemplateField>
                                <asp:TemplateField FooterText="总价" HeaderText="总价" SortExpression="ExtendedPrice" Visible="false">
                                    <ItemTemplate>
                                        <asp:Label ID="lblExtendedPrice" runat="server" Text='<%# GetPreferenceDigit(Eval("ExtendedPrice").ToString()) %>'
                                            meta:resourcekey="lblExtendedPrice"></asp:Label>
                                    </ItemTemplate>
                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
                    </div>
                    </td>
                </tr>
                <tr style="height:30px;">
                    <td></td>
                </tr>
            </table>
        </div>
        </div>
          <input type="hidden" id="hdnOrderby" runat="server" value="ASC" />
          </ContentTemplate>            
        </asp:UpdatePanel>
    </div>
    <input type="hidden" id="hiddenFlag" />
     <input type="hidden" id="hdnSkuChanged"  runat="server" />
    <input type="hidden" id="hdnRowIndex" runat="server" />
    <input type="hidden" id="hdnDataFormat"  runat="server"/>  
    <input type="hidden" id="hdncalendarFlag"  runat="server"/>  
    <input type="hidden" id="hdnOwnerID" runat="server" />
    <input type="hidden" id="hdnFrom" runat="server" />
    <input type="hidden" id="hdnOrderID" runat="server" />
    <input type="hidden" id="hdnSkuID" runat="server" />
    <input type="hidden" id="hiddenReportFlag" />
    <div id="actionDiv" style="background-color: #FFFFFF; position: absolute; display: none;">
        <table width="105" border="0" cellspacing="0" cellpadding="0" id="divcontent_menu2">
            <tr class="bg2" onmouseover="this.className='bg1'" onmouseout="this.className='bg2'">
                <td class="line" id="tdlnkbtnSalesOrderSubmit" runat="server" visible="false">
                    <asp:LinkButton ID="lnkbtnSalesOrderSubmit" runat="server" Text="提交" 
                        onclick="lnkbtnSalesOrderSubmit_Click"  OnClientClick="blockScreen();"  meta:resourcekey="lnkbtnSalesOrderSubmit" ></asp:LinkButton>
                </td>
            </tr>
            <tr class="bg2" onmouseover="this.className='bg1'" onmouseout="this.className='bg2'">
                <td class="line" id="tdlnkbtnSalesOrderCancel" runat="server" visible="false">
                    <asp:LinkButton ID="lnkbtnSalesOrderCancel" runat="server" Text="取消" 
                        onclick="lnkbtnSalesOrderCancel_Click" OnClientClick="blockScreen();"  meta:resourcekey="lnkbtnSalesOrderCancel" ></asp:LinkButton>
                </td>
            </tr>
            <tr class="bg2" onmouseover="this.className='bg1'" onmouseout="this.className='bg2'">
                <td class="line" id="tdlnkbtnImportSalesOrderDetail" runat="server" visible="false">
                    <asp:LinkButton ID="lnkbtnImportSalesOrderDetail" runat="server" Text="导入" 
                        OnClientClick="ImportSalesOrderDetail();return false"  meta:resourcekey="lnkbtnImportSalesOrderDetail" ></asp:LinkButton>
                        <a id="aImportSalesOrder" runat="server"  onserverclick="ImportSalesOrderData"></a>
                </td>
            </tr>
        </table>
    </div>
    <div id="reportDiv" style="background-color:#FFFFFF; position:absolute;display:none;">
        <table width="105" border="0" cellspacing="0" cellpadding="0" id="divcontent_menu">
         <tr class="bg2" onmouseover="this.className='bg1'" onmouseout="this.className='bg2'">
             <td class="line"  id="tdlnkbtnPrintsO" runat="server"  visible="false" >
                 <asp:LinkButton ID="lnkbtnPrintSO" runat="server"  Text="<%$Resources:ButtonResource,lnkbtnPrintSO%>" OnClientClick="popPrintSalesOrder();"  ></asp:LinkButton>
             </td>
         </tr>
        </table>
    </div>
    </form>
</body>
</html>
<script language="javascript" type="text/javascript" event="onclick" for="document">
<!--
	hiddenDiv();
	hiddenReportDiv();
		hiddenCalendarDiv();
//-->
</script>